package clients

import (
	"gitee.com/lailonghui/vehicle-supervision-framework/pkg/traces"
	"net/http"
)

var (
	HttpRequestOptions httpRequestOptions
)

type httpRequestOptions string

// 链路ID
func (httpRequestOptions) TraceId(req *http.Request) {
	traceId := traces.GetTraceId(req.Context())
	if traceId != nil {
		req.Header.Add(traces.TraceIdHeader, *traceId)
	}
}
